import com.java.demo.Articles;

import com.java.demo.User;
import com.java.demo.model.Article;

import org.springframework.context.ApplicationContext;

import org.springframework.context.support.ClassPathXmlApplicationContext;


public class APP {
    public static void main(String[] args) {
        //得到容器对象
        ApplicationContext context=new
                ClassPathXmlApplicationContext("spring-config.xml");
        //得到bean对象*/

             /*   User user=context.getBean("user", User.class);
                //使用bean
        user.sayHi();*/

        //得到bean对象
        //*Student student=context.getBean("student",Student.class);*//*
        //使用bean
        //
 Article article=context.getBean("aaa",Article.class);
        System.out.println(article.toString());
        //*Articles articles=context.getBean("articles",Articles.class);
        //articles.sayHi();
    }
}
